<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jQuery初体验</title>
    <script src="./res/jquery-3.5.1.min.js"></script>
</head>

<body>
    <img src="./img/head.png" width="300px" alt="">
</body>

</html>
<script>
    window.addEventListener('DOMContentLoaded', function(e) {
        window.document.querySelector('img').addEventListener('click', function(e) {
            this.style.display = 'none';
        });
    });
</script>